package entity

import (
	"shqsoft.cn/pasnj/base"
)

//BaseMnlr 科目
type BaseMnlr struct {
	ID      int     `gorm:"AUTO_INCREMENT;primary_key;column:ID"`
	YWPZ    string  `gorm:"column:YWPZ;"`
	FTPCSCS string  `gorm:"column:FTPCSCS;"`
	JE      float64 `gorm:"column:JE;"`
	LL      float64 `gorm:"column:LL;"`
	FTP     float64 `gorm:"column:FTP;"`
	JSGS    string  `gorm:"column:JSGS;"`
	MNLR    string  `gorm:"column:MNLR;"`
}

//TableName BaseMnlr 机构表名
func (BaseMnlr) TableName() string {
	return "T_BASE_MNLR"
}

func (u *BaseMnlr) AfterFind() (err error) {
	base.DB.Exec("truncate table T_BASE_MNLR ")
	return nil
}

func BaseMnlrEF() base.EntityFunc {
	return func() interface{} {
		entity := BaseMnlr{}
		return &entity
	}
}
func BaseMnlrESF() base.EntitiesFunc {
	return func() interface{} {
		var entities []BaseMnlr
		return &entities
	}
}

func init() {
	base.DaoPoolObj.Put("BaseMnlr", base.NewDefaultDao(BaseMnlrEF(), BaseMnlrESF(), nil))
}
